<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #clock{
            width: 500px;
            height: 500px;
            border: 1px solid black;
            border-radius: 50%;
            margin: 0px auto;
            position: relative;
        }
        #second{
            width: 2px;
            height: 250px;
            background-color: black;
            position: absolute;
            left: 250px;
            transform: rotate(0deg);
            transform-origin: center bottom;
        }
        #minutes{
            width: 3px;
            height: 200px;
            background-color: black;
            position: absolute;
            left:250px;
            top: 50px;
            transform: rotate(0deg);
            transform-origin: center bottom;
        }
        #hour{
            width: 4px;
            height: 150px;
            background-color: black;
            position: absolute;
            left: 250px;
            top: 100px;
            transform: rotate(0deg);
            transform-origin: center bottom;
        }
    </style>
</head>
<body>
    <div id="clock">
        <div id="hour"></div>
        <div id="minutes"></div>
        <div id="second"></div>
    </div>
    <script>
        var hourtime = document.getElementById("hour")
        var minutestime = document.getElementById("minutes")
        var secondtime = document.getElementById("second")
        function fn(){
            var time = new Date()
            var hour = time.getHours();
            var minutes = time.getMinutes();
            var second = time.getSeconds()+ms/1000;
            var ms = time.getMilliseconds();
            var deg3 = 360/(60/second);
            var deg2 = 360/(60/minutes);
            var deg1 = 360/(12/hour);
            hourtime.style.transform = `rotate(${deg1}deg)`
            minutestime.style.transform = `rotate(${deg2}deg)`
            secondtime.style.transform = `rotate(${deg3}deg)`
        }
        fn();
        setInterval(function() {
            fn()
        }, 1000);
    </script>
</body>
</html>